<template>
  <div>
    <h1>computed结合ts</h1>
    <h2>{{ doubleCount }}</h2>
  </div>
</template>

<script setup lang="ts">
import { computed, ref } from 'vue';

const count = ref(0)
// count.value.split('')
// 那我们就想自己配置泛型 写计算属性的类型怎么办 函数括号前面尖括号加类型
const doubleCount = computed<string>(() => (count.value * 2).toFixed(2))
</script>

<style scoped>

</style>
